package com.itcoon.cloud.framework.transform.converter;/**
 * @author Athric Yu
 * 2024/10/16
 **/

import com.itcoon.cloud.framework.transform.enums.TransformFeature;
import com.itcoon.cloud.framework.transform.definition.InjectDefinition;
import com.itcoon.cloud.framework.transform.function.MapperFunction;
import org.springframework.core.Ordered;
import org.springframework.lang.NonNull;
import org.springframework.lang.Nullable;

import java.lang.reflect.Type;
import java.util.List;

/**
 *
 *
 * @author Athric Yu
 * 2024/10/16
 **/
public interface Converter<T, R> extends Ordered {

    boolean maches(Object source, Class<?> targetClass);

    R convert(@NonNull T source, @Nullable R target, @NonNull Class<R> targetClass, Type[] actualTypes, @NonNull String[] ignoreProperties, @NonNull List<InjectDefinition> injectDefinitions, @NonNull List<MapperFunction> mapperFunctions, TransformFeature... features);


}
